<!DOCTYPE html>
<html lang="zh-cmn-Hans">
	<head>
		<meta charset="UTF-8">
		<meta http-equiv="X-UA-Compatible" content="ie=edge" />
		<title>鹿程智慧油站商户平台</title>
		<meta name="description" content="鹿程科技是提供加油站互联网化零管系统、营销及支付和大数据分析运营服务的行业领先科技公司。鹿程科技充分了解加油站行业的需求和新兴互联网的发展,依靠业内最先进的科技和标准化的运营,持续帮助油站业务发展创造价值。"/>
		<meta name="keywords" content="智慧油站,鹿程,鹿程智慧油站,鹿程智慧油站微信支付,加油站微信支付,加油站营销管理"/>
		<link rel="icon" href="https://static.zhihuiyouzhan.com.cn/static/styles/admin/img/title.ico" type="image/x-icon">
		<link rel="shortcut icon" href="https://static.zhihuiyouzhan.com.cn/static/styles/admin/img/title.ico" type="image/x-icon">
		<link href="//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
		<link rel="stylesheet" href="../layui/css/layui.css" />
		<link rel="stylesheet" href="../css/style.css" />
	</head>
<body>
		<!--deer-content-->
		<div class="car-btn-content" style="border-top:none;">
			<input type="number" min="10" class="layui-input" autocomplete="off" name="car_money" />
			<span>冲值金额不得小于10元，并且最小单位为元</span>
			<div class="car-bind-btn">
				<dl class="deer-btn">确定</dl>
				<dl class="deer-btns">取消</dl>
			</div>
		</div>
		<!--deer-content-->
		
	<!--js-->
	<aside>
		<script type="text/javascript" src="../layui/layui.js" ></script>
		<script type="text/javascript">
			layui.use(['layer','jquery'], function(){
			  	var $=layui.jquery;
			  	var layer=layui.layer;
			  	var index = parent.layer.getFrameIndex(window.name)
				
				$("[name='car_money']").focus()
				var num=/^[1-9]+[0-9]*$/
				$('.deer-btn').bind('click',function(){
					//设光标位置
					$("[name='car_money']").focus()
					//获取输入框的值
					var value=$("[name='car_money']").val()
					var name='天之飞龙'
					
					if(value==''){
						layer.tips('您尚未输入任何金额',"[name='car_money']",{tips:3})
					}else if(num.test(value)==false){
						layer.tips('请输入正确的金额格式',"[name='car_money']",{tips:3})
					}else if(value<10){
						layer.tips('充值金额不得小于10元',"[name='car_money']",{tips:3})
					}else{
						
						parent.layer.confirm('您确定要给<span style="color:red">'+name+'</span>充值<span style="color:red">'+value+'</span>元吗？',{
							title:'请确认？'
						},function(index2){
//							
							parent.layer.close(index2)
							$('.car-btn-content').empty()
							layer.msg('充值成功：'+value,{icon:1},function(){
//								window.open("/index.php/merchant/work_summary/workindex.html",'luchen'); 刷新页面
								parent.layer.close(index)
							})
							
						})
						
					}
					
					
					
					
					
					
					
				})
			    $('.deer-btns').bind('click',function(){
						
						parent.layer.close(index)
						
						
					})
			    
			});
			</script>
		</script>
	</aside>
	<!--js-->
	
	
	
</body>
</html>